
<template>
    <div id="buildingD">
        <img @click='pre(index)' :src="item.fileUrl" v-for="(item,index) in images" :key='index' alt="">
        <p v-html="p"></p>
    </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      p: "",
      images: []
    };
  },
  mounted() {
    this.findEsTeamById();
  },
  beforeCreate(){
    localStorage.setItem('userType','normal')
  },
  created() {},
  methods: {
    pre(i) {
      wx.previewImage({
        current: this.images[i].fileUrl, // 当前显示图片的http链接
        urls: this.images.map(item => {
          return item.fileUrl;
        }) // 需要预览的图片http链接列表
      });
    },
    findEsTeamById() {
      let url =
        this.$CONSTANT.TEAM.findEsTeamById +
        "?sessionId=" +
        this.$common.getCookie("sessionId");
      let param = {
        id: this.$route.query.id
      };
      // this.$vux.loading.show({
      //   text: "loading"
      // });
      console.log(param);
      this.$common.post(url, param, res => {
        this.isloading = true;
        setTimeout(() => {
          this.$vux.loading.hide()
        }, 500);
        if (res.status == 200) {
          var bussData = res.data.bussData;
          this.p = bussData.detail;
          this.images = bussData.images;
        } else {
          this.$vux.toast.show({
            text: res.msg,
            type: "warn",
            width: "auto"
          });
        }
      });
    }
  },
  components: {}
};
</script>

<style lang="less">
#buildingD {
  min-height: 100%;
  background: #fff;
  padding: 0px 10px 0 10px;
  p {
    margin-bottom: 10px;
    // text-indent: 14px;
    color: #333;
    font-family: PingFang-SC-Medium;
    font-size: 14px;
  }
  img {
    width: 100% !important;
    margin-top: 10px;
  }
}
</style>
